package com.zhuzhoujia.main;

import com.example.zhuzhoujia.R;
import com.zhuzhoujia.utils.Utils;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class Search extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_search_layout);
		Utils utils = new Utils();
		utils.initActionBarByLayout(getActionBar(), this, initActionBar(findViewById(R.id.ll)), R.color.baise);
		utils.setStatusBarTintResource(this, R.color.gray);
	}

	private View initActionBar(View view) {
		View v = LayoutInflater.from(Search.this).inflate(R.layout.search_actionbar_layout, null);
		new Utils().setClickBackClose(v, this);
		return v;
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			finish();
			overridePendingTransition(R.anim.stay, R.anim.translate_out);
		}
		return super.onKeyDown(keyCode, event);
	}
}
